import request from "../utils/request";

//获取文章列表
export function getArticleList(data) {
  return request({
    method: "post",
    url: "/api/PCApplet/PageList_Article",
    data
  });
}

//新增文章
export function addNewArticle(data) {
  return request({
    method: "post",
    url: "/api/PCApplet/Add_Article",
    data
  });
}

//修改文章
export function updateArticle(data) {
  return request({
    method: "put",
    url: "/api/PCApplet/Update_Article",
    data
  });
}

//删除文章
export function delectArticle(id) {
  return request({
    method: "delete",
    url: `/api/PCApplet/Delte_Article?id=${id}`,

  });
}

// 文章详情
export function getArticleDetailById(params) {
  return request({
    method: "get",
    url: "/api/PCApplet/Get_Article",
    params
  });
}
